home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 60 / IOPROG_60.ISO / soft / c++ / gsl-1.1.1-setup.exe / {app} / src / cblas / test_syr2.c < prev    next >
Encoding:
C/C++ Source or Header  |  2002-04-18  |  3.9 KB  |  188 lines

  1. #include <gsl/gsl_test.h>
  2. #include <gsl/gsl_ieee_utils.h>
  3. #include <gsl/gsl_math.h>
  4. #include <gsl/gsl_cblas.h>
  5.  
  6. #include "tests.h"
  7.  
  8. void
  9. test_syr2 (void) {
  10. const double flteps = 1e-4, dbleps = 1e-6;
  11.   {
  12.    int order = 101;
  13.    int uplo = 121;
  14.    int N = 1;
  15.    int lda = 1;
  16.    float alpha = 0.0f;
  17.    float A[] = { 0.862f };
  18.    float X[] = { 0.823f };
  19.    int incX = -1;
  20.    float Y[] = { 0.699f };
  21.    int incY = -1;
  22.    float A_expected[] = { 0.862f };
  23.    cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
  24.    {
  25.      int i;
  26.      for (i = 0; i < 1; i++) {
  27.        gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1434)");
  28.      }
  29.    };
  30.   };
  31.  
  32.  
  33.   {
  34.    int order = 101;
  35.    int uplo = 122;
  36.    int N = 1;
  37.    int lda = 1;
  38.    float alpha = 0.0f;
  39.    float A[] = { 0.862f };
  40.    float X[] = { 0.823f };
  41.    int incX = -1;
  42.    float Y[] = { 0.699f };
  43.    int incY = -1;
  44.    float A_expected[] = { 0.862f };
  45.    cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
  46.    {
  47.      int i;
  48.      for (i = 0; i < 1; i++) {
  49.        gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1435)");
  50.      }
  51.    };
  52.   };
  53.  
  54.  
  55.   {
  56.    int order = 102;
  57.    int uplo = 121;
  58.    int N = 1;
  59.    int lda = 1;
  60.    float alpha = 0.0f;
  61.    float A[] = { 0.862f };
  62.    float X[] = { 0.823f };
  63.    int incX = -1;
  64.    float Y[] = { 0.699f };
  65.    int incY = -1;
  66.    float A_expected[] = { 0.862f };
  67.    cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
  68.    {
  69.      int i;
  70.      for (i = 0; i < 1; i++) {
  71.        gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1436)");
  72.      }
  73.    };
  74.   };
  75.  
  76.  
  77.   {
  78.    int order = 102;
  79.    int uplo = 122;
  80.    int N = 1;
  81.    int lda = 1;
  82.    float alpha = 0.0f;
  83.    float A[] = { 0.862f };
  84.    float X[] = { 0.823f };
  85.    int incX = -1;
  86.    float Y[] = { 0.699f };
  87.    int incY = -1;
  88.    float A_expected[] = { 0.862f };
  89.    cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
  90.    {
  91.      int i;
  92.      for (i = 0; i < 1; i++) {
  93.        gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1437)");
  94.      }
  95.    };
  96.   };
  97.  
  98.  
  99.   {
  100.    int order = 101;
  101.    int uplo = 121;
  102.    int N = 1;
  103.    int lda = 1;
  104.    double alpha = 0;
  105.    double A[] = { -0.824 };
  106.    double X[] = { 0.684 };
  107.    int incX = -1;
  108.    double Y[] = { 0.965 };
  109.    int incY = -1;
  110.    double A_expected[] = { -0.824 };
  111.    cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
  112.    {
  113.      int i;
  114.      for (i = 0; i < 1; i++) {
  115.        gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1438)");
  116.      }
  117.    };
  118.   };
  119.  
  120.  
  121.   {
  122.    int order = 101;
  123.    int uplo = 122;
  124.    int N = 1;
  125.    int lda = 1;
  126.    double alpha = 0;
  127.    double A[] = { -0.824 };
  128.    double X[] = { 0.684 };
  129.    int incX = -1;
  130.    double Y[] = { 0.965 };
  131.    int incY = -1;
  132.    double A_expected[] = { -0.824 };
  133.    cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
  134.    {
  135.      int i;
  136.      for (i = 0; i < 1; i++) {
  137.        gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1439)");
  138.      }
  139.    };
  140.   };
  141.  
  142.  
  143.   {
  144.    int order = 102;
  145.    int uplo = 121;
  146.    int N = 1;
  147.    int lda = 1;
  148.    double alpha = 0;
  149.    double A[] = { -0.824 };
  150.    double X[] = { 0.684 };
  151.    int incX = -1;
  152.    double Y[] = { 0.965 };
  153.    int incY = -1;
  154.    double A_expected[] = { -0.824 };
  155.    cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
  156.    {
  157.      int i;
  158.      for (i = 0; i < 1; i++) {
  159.        gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1440)");
  160.      }
  161.    };
  162.   };
  163.  
  164.  
  165.   {
  166.    int order = 102;
  167.    int uplo = 122;
  168.    int N = 1;
  169.    int lda = 1;
  170.    double alpha = 0;
  171.    double A[] = { -0.824 };
  172.    double X[] = { 0.684 };
  173.    int incX = -1;
  174.    double Y[] = { 0.965 };
  175.    int incY = -1;
  176.    double A_expected[] = { -0.824 };
  177.    cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
  178.    {
  179.      int i;
  180.      for (i = 0; i < 1; i++) {
  181.        gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1441)");
  182.      }
  183.    };
  184.   };
  185.  
  186.  
  187. }
  188.